﻿using System.Linq;
using System.Collections.Generic;

namespace Trentacular.SharePoint.Deployment.Model
{
    public class Farm : BaseFeatureContainer<FarmFeature, Farm>
    {
        public virtual IList<WebApplication> WebApplications { get; set; }

        public virtual IList<Solution> Solutions { get; set; }

        public virtual IEnumerable<FeatureDefinition> AllFeatureDefinitions
        {
            get { return Solutions.SelectMany(s => s.FeatureDefinitions); }
        }

        public override IList<FarmFeature> Features { get; set; }
    }
}
